<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<c:set var="ctx" value="${r'${pageContext.request.contextPath}'}"/>
<!DOCTYPE html>
<html lang="zh-CN">
  <head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <%@ include file="/common/${projectName}/include/common-base.jsp"%>
  <title>${template.titleName}</title>
  <!-- Tell the browser to be responsive to screen width -->
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
</head>

<!-- Part 一、 以下是body主体内容的模块区域 -->
<body class="hold-transition ${r'${sysColor}'} sidebar-mini">
<div class="wrapper">

  <!-- top start -->
  <%@include file="/common/${projectName}/top.jsp" %>
  <!-- top end -->
  <!-- left start -->
  <%@include file="/common/${projectName}/left.jsp" %>
  <!-- left end-->

  <div class="content-wrapper">
    <!-- Main start -->
	<section class="content">
	  			<div id="div_hidden_content" class="hidden" style="display:none;">
	  					<div id="hidden_common_final">
							<!-- temp="hidden_common_final" start -->
							<!-- temp="hidden_common_final" end -->
						 </div>
						 
						 <form id="viewForm" action="javascript:;">
                 			<!-- temp="viewForm_hidden" start -->
							<div id="viewForm_hidden" style="display:none;"></div>
							<!-- temp="viewForm_hidden" end -->
			  			</form>
	  			</div>
      <div class="row">
        <div class="col-lg-12">
        
          <div class="box box-info">
	          <div class="box-header with-border">
                 <h3 class="box-title"><i class="fa fa-info-circle"></i> ${template.titleName}</h3>
              </div>
            <div class="box-body viewForm">
            
            
			<#if (detailList?size > 1)>
				<#list detailList as detail>
				<#assign tabNo = detail.tabNo>
				<div class="panel">
					<div class="panel-heading">
						<h4><b>| </b> ${detail.tabName!''}</h4>
					</div>
					<div class="panel-body">
					
						<!-- temp="${detail.formType!'viewForm'}1_content_${tabNo}" start -->
						<div id="${detail.formType!'viewForm'}1_content_${tabNo}" data-temp-code="true"
							data-temp-type="${detail.formType!'viewForm'}" data-temp-form-id="${detail.formType!'viewForm'}_content_${tabNo}">
						</div>
						<!-- temp="${detail.formType!'viewForm'}1_content_${tabNo}" end -->
						
					</div>
				</div>
				</#list>  
			<#else>
				<div class="panel">
					<div class="panel-body">
						<!-- temp="viewForm_content" start -->
						<div id="viewForm_content" data-temp-code="true"
							data-temp-type="viewForm" data-temp-form-id="viewForm_content">
							
						</div>
						<!-- temp="viewForm_content" end -->
					</div>
				</div>
            </#if>
					
            </div>
            
             <div class="box-footer text-center">
			       <button class="btn btn-success pull-right" type="button" onclick="window.history.back();"> 返回</button>
			 </div>
	     </div>
           
       
        </div>
      </div>
  

<!-- Part 二、 以下是js模块区域 -->
<script>
var clickMenu = "${template.menuId}";
/**
 * 初始化数据字典
 */
var dictListMap = DictUtil.initDictAndDymic();
 
$(function () {
	getViewInfoById()
});
//数据toLoad读取（查看、编辑）数据
function getViewInfoById(){
	$.get(common_info_url, $("#viewForm").serialize(),function(myData){
		console.log(myData);
		//反显加载数据
		if(myData){
			for(var objNameKey in myData){
				FormUtil.loadView(objNameKey, myData[objNameKey]);
			}
		}
   	},"json");
}
</script>
</section>
<!-- Main end -->   
</div>
<!-- foot start -->
<%@include file="/common/${projectName}/foot.jsp" %>
<!-- foot start -->
</div>
<!-- /.content-wrapper -->
</body>
</html>
